/**
 *Project: jh-framework
 *File: cn.xkshow.util.CalendarUtil.java 
 *Author: admin@xkshow.cn with the copyrite
 ****************************************************************
 *   VERSION       DATE            BY       CHANGE/COMMENT
 * --------------------------------------------------------------
 *    1.0        2013-4-12        xkshow.cn         create
 ****************************************************************
 *note:
 ***************************************************************/ 
package cn.xkshow.util;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;

public class CalendarUtil {
	
	/*
	 * 获取未来第几天的日期
	 */
	public static String getFDateByWhich(int which) {   
		 Calendar calendar = Calendar.getInstance();   
		 calendar.add(calendar.DATE, which);   
		 return new SimpleDateFormat("MM/dd/yyyy").format(calendar.getTime());   
	}  
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		List lst = new ArrayList();
		lst.add(CalendarUtil.getFDateByWhich(1));
		lst.add(CalendarUtil.getFDateByWhich(2));
		lst.add(CalendarUtil.getFDateByWhich(3));
		lst.add(CalendarUtil.getFDateByWhich(4));
		lst.add(CalendarUtil.getFDateByWhich(5));
		lst.add(CalendarUtil.getFDateByWhich(6));
		lst.add(CalendarUtil.getFDateByWhich(7));
		
		for (int i = 0; i < lst.size(); i++) {
			System.out.println(lst.get(i));
		}
	}
	
}
